function model = KNNTrain( feat, res , k)

if nargin<3
    k = 5;
end

k = min(k , size(feat,1) );

model.k = k;
model.feat = feat;
model.res = res;